<!--编辑敏感词-->
<div class="dialog_content">
<form id="info_form" action="{:u('badword/edit')}" method="post">
<div class="common-form">
	<table width="100%" cellpadding="2" cellspacing="1" class="table_form">
        <tr>
			<th width="100">敏感类型 :</th>
			<td>
            <select name="word_type" id="word_type">
            <option value="1" {if rs('word_type')=1}selected="selected"{/if}>禁用</option>
			<option value="2" {if rs('word_type')=2}selected="selected"{/if}>替换</option>
			<option value="3" {if rs('word_type')=3}selected="selected"{/if}>审核</option>
            </select></td>
		</tr>
        <tr>
			<th width="100">敏感词 :</th>
			<td><input type="text" name="badword" id="badword" class="input-text" size="30" value="{$rs('badword')}"></td>
		</tr>
        <tr>
			<th width="100">敏感词替换 :</th>
			<td><input type="text" name="replaceword" id="replaceword" class="input-text" size="30" value="{$rs('replaceword')}"></td>
		</tr>
	</table>
</div>
<input type="hidden" name="id" value="{$rs('id')}" />
</form>
</div>
<script type="text/javascript">
var check_name_url = "{:U('badword/ajax_check_name?id=' & rs('id') )}";
$(function(){
	$("#badword").formValidator({onshow:"请填写敏感词",onfocus:"请填写敏感词"}).inputValidator({min:1,onerror:"请填写敏感词"}).ajaxValidator({
	    type : "get",
		url : check_name_url,
		datatype : "json",
		async:'false',
		success : function(result){	
            if(result.status == 0){
                return false;
			}else{
                return true;
			}
		},
		buttons: $("#dosubmit"),
		onerror : "敏感词已经存在",
		onwait : "正在验证"
	}).defaultPassed();
});
</script>